package com.kt.uokos.yimo.service.impl;

import com.kt.uokos.yimo.dao.GoodsProduct;
import com.kt.uokos.yimo.example.GoodsProductExample;
import com.kt.uokos.yimo.mapper.GoodsProductMapper;
import com.kt.uokos.yimo.service.GoodsProductService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;
@Service
public class GoodsProductServiceImpl implements GoodsProductService {


    @Resource
    private GoodsProductMapper goodsProductMapper;

    @Override
    public List<GoodsProduct> queryGoodsProperty(Integer id) {
        GoodsProductExample example = new GoodsProductExample();
        example.or().andGoodsIdEqualTo(id).andDeletedEqualTo(false);
        return goodsProductMapper.selectByExample(example);
    }

    @Override
    public GoodsProduct queryById(Integer id) {
        return goodsProductMapper.selectByPrimaryKey(id);
    }
}
